# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_VideoContext do
  @moduledoc """
  Video context and/or feature-specific parameters.

  ## Attributes

  *   `explicitContentDetectionConfig` (*type:* `GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_ExplicitContentDetectionConfig.t`, *default:* `nil`) - Config for EXPLICIT_CONTENT_DETECTION.
  *   `faceDetectionConfig` (*type:* `GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_FaceDetectionConfig.t`, *default:* `nil`) - Config for FACE_DETECTION.
  *   `labelDetectionConfig` (*type:* `GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_LabelDetectionConfig.t`, *default:* `nil`) - Config for LABEL_DETECTION.
  *   `objectTrackingConfig` (*type:* `GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_ObjectTrackingConfig.t`, *default:* `nil`) - Config for OBJECT_TRACKING.
  *   `personDetectionConfig` (*type:* `GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_PersonDetectionConfig.t`, *default:* `nil`) - Config for PERSON_DETECTION.
  *   `segments` (*type:* `list(GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_VideoSegment.t)`, *default:* `nil`) - Video segments to annotate. The segments may overlap and are not required to be contiguous or span the whole video. If unspecified, each video is treated as a single segment.
  *   `shotChangeDetectionConfig` (*type:* `GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_ShotChangeDetectionConfig.t`, *default:* `nil`) - Config for SHOT_CHANGE_DETECTION.
  *   `speechTranscriptionConfig` (*type:* `GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_SpeechTranscriptionConfig.t`, *default:* `nil`) - Config for SPEECH_TRANSCRIPTION.
  *   `textDetectionConfig` (*type:* `GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_TextDetectionConfig.t`, *default:* `nil`) - Config for TEXT_DETECTION.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :explicitContentDetectionConfig =>
            GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_ExplicitContentDetectionConfig.t()
            | nil,
          :faceDetectionConfig =>
            GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_FaceDetectionConfig.t()
            | nil,
          :labelDetectionConfig =>
            GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_LabelDetectionConfig.t()
            | nil,
          :objectTrackingConfig =>
            GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_ObjectTrackingConfig.t()
            | nil,
          :personDetectionConfig =>
            GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_PersonDetectionConfig.t()
            | nil,
          :segments =>
            list(
              GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_VideoSegment.t()
            )
            | nil,
          :shotChangeDetectionConfig =>
            GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_ShotChangeDetectionConfig.t()
            | nil,
          :speechTranscriptionConfig =>
            GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_SpeechTranscriptionConfig.t()
            | nil,
          :textDetectionConfig =>
            GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_TextDetectionConfig.t()
            | nil
        }

  field(:explicitContentDetectionConfig,
    as:
      GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_ExplicitContentDetectionConfig
  )

  field(:faceDetectionConfig,
    as: GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_FaceDetectionConfig
  )

  field(:labelDetectionConfig,
    as: GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_LabelDetectionConfig
  )

  field(:objectTrackingConfig,
    as: GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_ObjectTrackingConfig
  )

  field(:personDetectionConfig,
    as: GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_PersonDetectionConfig
  )

  field(:segments,
    as: GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_VideoSegment,
    type: :list
  )

  field(:shotChangeDetectionConfig,
    as:
      GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_ShotChangeDetectionConfig
  )

  field(:speechTranscriptionConfig,
    as:
      GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_SpeechTranscriptionConfig
  )

  field(:textDetectionConfig,
    as: GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_TextDetectionConfig
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_VideoContext do
  def decode(value, options) do
    GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_VideoContext.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.VideoIntelligence.V1.Model.GoogleCloudVideointelligenceV1_VideoContext do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
